package bavaria.hightech.banking.conditions;

import java.text.MessageFormat;

import bavaria.hightech.banking.resourceBundles.LanguageBundle;

/**
 * this is the derivated class for fixed deposit conditions
 * 
 * @author David 
 */

public class FixedDepositConditions extends Conditions {

	protected int time;

	/**
	 * default-constructor
	 * @param interest_have
	 * @param time
	 * @param languageBundle
	 */
	public FixedDepositConditions(int interest_have, int time,
			LanguageBundle languageBundle) {
		this.interest_have = interest_have;
		this.time = time;
		this.languageBundle = languageBundle;
	}

	/**
	 * get time
	 * @return
	 */
	public int getTime() {
		return time;
	}

	/**
	 * set time by param
	 * @param time
	 */
	public void setTime(int time) {
		this.time = time;
	}

	@Override
	public String toString() {
		String str = "";
		str = "{7}:\n";
		str += "{11}: " + time + "\n";
		str += "{10}: " + getInterest_Have() + "\n";
		str = MessageFormat.format(str, languageBundle.getContents());
		return str;
	}
}
